<template>
	<c-navBar title="服务协议"></c-navBar>
	<view class="privacy">
		
		<view class="content" v-html="privacyHtml">
			
		</view>
	</view>
</template>

<script setup>
	import {
		getAgreement
	} from "@/apis/login.js"
	import {
		onLoad,
		onShow
	} from "@dcloudio/uni-app"
	import {
		ref,
		reactive
	} from "vue"
	const active=ref(0)
	const privacyHtml=ref('')
	const tabs = [{
			id: 1,
			label: '隐私政策'
		},
		{
			id: 2,
			label: '服务协议'
		},
	]
	const type = ref(1)
	onLoad(() => {
		getDatas()
	})
	const getDatas = async () => {
		let {
			data
		} = await getAgreement({
			type:tabs[type.value].id 
		})
		privacyHtml.value=data
		// console.log(data)
	}
	const change=()=>{
		getDatas()
	}
	const pathHome = () => {

		uni.reLaunch({
			url: '/pages/index/index'
		})
	}
</script>

<style lang="scss" scoped>
.privacy{
	width: 100vw;
}
.tabs-container{
	width: 100vw;
}
.content{
	width: 100%;
	padding: 12rpx 24rpx;
}
</style>